import requests
import config

class ContractAPI:
    def __init__(self):
        self.upload_url=config.BASIC_URL+"/api/common/upload"
        self.add_contract_url=config.BASIC_URL+"/api/contract"

    def upload_contract(self,test_data,token):
        return requests.post(url=self.upload_url,files={"file":test_data},headers={"Authorization":token})
    def add_contract(self,test_data,token):
        return requests.post(url=self.add_contract_url,json=test_data,headers={"Authorization":token})